package org.chen.scene.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.chen.common.scene.entity.CityCoordinate;

@Mapper
public interface CityCoordinateMapper extends BaseMapper<CityCoordinate> {
    
    @Select("SELECT * FROM scene_city_coordinates WHERE enabled = true AND " +
            "(city_name = #{cityName} OR normalized_name = #{normalizedName}) " +
            "LIMIT 1")
    CityCoordinate findByCityName(@Param("cityName") String cityName, 
                                  @Param("normalizedName") String normalizedName);
}